<?php

namespace App\Policies;


use App\Models\User;
use App\Models\Conf\Agent;

class AgentPolicy extends Policy
{
    public function index(User $user, Agent $agent)
    {
        return $user->can('manage_agent');
    }

    public function create(User $user, Agent $agent)
    {
        return $user->can('manage_agent');
    }

    public function update(User $user, Agent $agent)
    {
        return $user->can('manage_agent');
    }

    public function destroy(User $user, Agent $agent)
    {
        return $user->can('manage_agent');
    }

    public function withdrawal(User $user, Agent $agent)
    {
        return $user->can('self_agent');
    }

    public function withdrawalAudit(User $user, Agent $agent)
    {
        return $user->can('manage_agent');
    }

    public function earning(User $user, Agent $agent)
    {
        return $user->can('self_agent');
    }


}
